<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>车辆管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/travel/bus/">车辆列表</a></li>
		<li class="active"><a href="${ctx}/travel/bus/form?id=${bus.id}">车辆<shiro:hasPermission name="travel:bus:edit">${not empty bus.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="travel:bus:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="bus" action="${ctx}/travel/bus/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<form:hidden path="user.id"/>
		<tags:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">二维码编号:</label>
			<div class="controls">
				<form:input path="qrcodeNumber" htmlEscape="false"  maxlength="50" class="required uneditable-input" readonly="readonly" />  <span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">起始地:</label>
			<div class="controls">
				<form:input path="startPlace" htmlEscape="false" maxlength="100" class="required"/> <span style="color:red"> * </span>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">终到地:</label>
			<div class="controls">
				<form:input path="endPlace" htmlEscape="false" maxlength="100" class="required"/>  <span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">标志牌顺序号:</label>
			<div class="controls">
				<form:input path="flagOrderNumber" htmlEscape="false" maxlength="100" class="required"/>  <span style="color:red"> * </span>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">车牌号:</label>
			<div class="controls">
				<form:input path="number" htmlEscape="false" maxlength="50" class="required"/>  <span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">运输企业:</label>
			<div class="controls">
				<form:input path="company" htmlEscape="false" maxlength="100" class="required"/> <span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">驾驶员姓名:</label>
			<div class="controls">
				<form:input path="drivers" htmlEscape="false" maxlength="50" class="required"/> <span style="color:red"> * </span>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">企业签发人:</label>
			<div class="controls">
				<form:input path="publisher" htmlEscape="false" maxlength="100" class="required"/><span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">主要途经地:</label>
			<div class="controls">
				<form:input path="roadLine" htmlEscape="false" maxlength="255" class="required"/> <span style="color:red"> * </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">有效期开始日期:</label>
			<div class="controls">
				
				<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
					<input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${bus.startDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">有效期结束日期:</label>
			<div class="controls">
				<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
					<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${bus.endDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
				
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">运输信息:</label>
			<div class="controls">
				<form:input path="transport" htmlEscape="false" maxlength="255" class="required"/> <span style="color:red"> * </span>
			</div>
		</div>
		
		
		
		<div class="control-group">
			<label class="control-label">备注:</label>
			<div class="controls">
				<form:textarea path="remarks" cols="10" rows="5"/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="travel:bus:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>
